package bookstore.database.pojo;

import java.math.BigDecimal;

/**
 * NewTopId entity. @author MyEclipse Persistence Tools
 */

public class NewTopId implements java.io.Serializable {

	// Fields

	private String isbn;
	private String bname;
	private BigDecimal bprice;
	private String imagePath;

	// Constructors

	/** default constructor */
	public NewTopId() {
	}

	/** full constructor */
	public NewTopId(String isbn, String bname, BigDecimal bprice,
			String imagePath) {
		this.isbn = isbn;
		this.bname = bname;
		this.bprice = bprice;
		this.imagePath = imagePath;
	}

	// Property accessors

	public String getIsbn() {
		return this.isbn;
	}

	public void setIsbn(String isbn) {
		this.isbn = isbn;
	}

	public String getBname() {
		return this.bname;
	}

	public void setBname(String bname) {
		this.bname = bname;
	}

	public BigDecimal getBprice() {
		return this.bprice;
	}

	public void setBprice(BigDecimal bprice) {
		this.bprice = bprice;
	}

	public String getImagePath() {
		return this.imagePath;
	}

	public void setImagePath(String imagePath) {
		this.imagePath = imagePath;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof NewTopId))
			return false;
		NewTopId castOther = (NewTopId) other;

		return ((this.getIsbn() == castOther.getIsbn()) || (this.getIsbn() != null
				&& castOther.getIsbn() != null && this.getIsbn().equals(
				castOther.getIsbn())))
				&& ((this.getBname() == castOther.getBname()) || (this
						.getBname() != null && castOther.getBname() != null && this
						.getBname().equals(castOther.getBname())))
				&& ((this.getBprice() == castOther.getBprice()) || (this
						.getBprice() != null && castOther.getBprice() != null && this
						.getBprice().equals(castOther.getBprice())))
				&& ((this.getImagePath() == castOther.getImagePath()) || (this
						.getImagePath() != null
						&& castOther.getImagePath() != null && this
						.getImagePath().equals(castOther.getImagePath())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getIsbn() == null ? 0 : this.getIsbn().hashCode());
		result = 37 * result
				+ (getBname() == null ? 0 : this.getBname().hashCode());
		result = 37 * result
				+ (getBprice() == null ? 0 : this.getBprice().hashCode());
		result = 37 * result
				+ (getImagePath() == null ? 0 : this.getImagePath().hashCode());
		return result;
	}

}